<?php
  
  $arr=[
      ['1','龙龙','龙龙历险记','12'],
      ['2','丽丽','丽丽历险记','18'],
      ['3','华丽','华丽历险记','26']
  ];
  if(isset($_POST['sub'])){
     $name=$_POST['text'];
     $arr=array_filter($arr,function($v) use ($name){
         return $v[1]==$name;
     });
  };
  if(isset($_POST['sub1'])){
    $name=$_POST['text1'];
    $arr=array_filter($arr,function($v) use ($name){
         return $v[3]< $name;
    });
  }
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <form action="" method="POST">
       <input type="text" name="text" id="">
       <input type="submit" name="sub" value="查询" >  
       <input type="text" name="text1" id="">
       <input type="submit" name="sub1" value="查询" >  
    </form>
    <table>
      <tr>
        <th>编号</th>
        <th>作者</th>
        <th>书名</th>
        <th>价格</th>
     </tr>

     <?php 
      forEach($arr as $value){
     ?>
      <tr>
        <td><?php echo $value[0]?></td>
        <td><?php echo $value[1]?></td>
        <td><?php echo $value[2]?></td>
        <td><?php echo $value[3]?></td>
      </tr>
     <?php }?>
    </table>
</body>
</html>